package com.xmg.shop.service.impl;

import com.xmg.shop.domain.Product;
import com.xmg.shop.mapper.ProductMapper;
import com.xmg.shop.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2017/8/11.
 */
@Service("productService") //不配置的话，默认是权限定名
public class ProductServiceImpl implements IProductService {
    @Autowired
    private ProductMapper productMapper;

    @Override
    public Product getProduct(Long id) {
       return productMapper.selectByPrimaryKey(id);
    }
}
